<?php

namespace app\api\controller\cps;

use app\common\controller\Api;



/**
 * 滴滴联盟接口
 */
class Didi extends Api
{

    protected $noNeedRight = ['*'];

    //推广活动查询
    public function activity()
    {
        try {
            $activity_id = input('activity_id',0);
            $jd_model = new \app\api\model\cps\Didi();

            $res = $jd_model->activity($activity_id,$this->auth->id);
        }  catch (\Exception $e) {
            $this->error($e->getMessage());
        }
        $this->success('请求成功',$res);
    }

    //订单
    public function order()
    {
        try {
            $jd_model = new \app\api\model\cps\Didi();

            $res = $jd_model->order();
        }  catch (\Exception $e) {
            $this->error($e->getMessage());
        }
        $this->success('请求成功',$res);
    }

    public function unliquidated()
    {
        try {
            $jd_model = new \app\api\model\cps\Didi();

            $res = $jd_model->unliquidated();
        }  catch (\Exception $e) {
            $this->error($e->getMessage());
        }
        $this->success('请求成功',$res);
    }
}